package cn.biwysh.exam.servlet;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.biwysh.exam.biz.NoticeBiz;
import cn.biwysh.exam.biz.ZhiShiBiz;

public class Zsdetail extends HttpServlet {

	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException
	{
		response.setContentType("text/html");
		request.setCharacterEncoding("UTF-8");
		String url="WEB-INF/jsp/zsdetail.jsp";
		String nidstr = request.getParameter("id");
		int nid=0;
		try{
			nid=Integer.parseInt(nidstr);
		}catch (Exception e) {
		}
		ZhiShiBiz biz=new ZhiShiBiz();
		request.setAttribute("zhishi", biz.GetKnowledgeById(nid));
		RequestDispatcher requestDispatcher = request.getRequestDispatcher(url);
		requestDispatcher.forward(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException
	{
     this.doGet(request, response);
	}

}
